package com.atguigu.serviceedu.controller;

import com.atguigu.commonutils.R;
import org.springframework.web.bind.annotation.*;

/**
 * 模拟登录接口
 */
@RestController
@RequestMapping("/serviceedu/user")
//@CrossOrigin//解决跨域问题
public class EduLoginController {

    @PostMapping("login")
    public R login(){
        return R.ok().data("token","admin");
    }

    @GetMapping("info")
    public R info(){
        return R.ok().data("roles","[admin]").data("name","爱敲代码的小游子").data("avatar","https://portrait.gitee.com/uploads/avatars/user/2192/6578938_youkaiyang_1592436228.png!avatar60");
    }


}
